public class MethodDefineTest{
    //需求：这个方法可以求任意2个整数的和
    public static int add(int a,int b){
       return a + b;
    }

    public static void main(String[] args) {
        int x = 1;
        int y = 2;
        int sum = add(x,y);
        System.out.println("sum = " + sum);
    }
}
